<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAddresseeTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('addressee', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id');//用户ID
            $table->string('name');//收件人姓名
            $table->integer('province');//省
            $table->integer('city');//市
            $table->integer('area');//区
            $table->string('address',255); //收件人地址
            $table->string('mobile',15);//收件人手机号
            $table->boolean('default')->default(true);//是否启用账号
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('addressee');
    }
}
